﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace MToolStudio.Render
{
    public class RenderConstants
    {
        public static readonly Color TouredActionColor = Color.Yellow;
        public static readonly Color TouredStateColor = Color.Yellow;
        public const int DefaultActionPenWidth = 2;
        public const int EmptyActionArrowPenWidth = 1;
        public const int FocusActionPenWidth = 4;
        public const double DefaultArrowLength = 16;
        public const int TouredActionPenWidth = 7;

        public const double TouredStateRadiusRatio = 1.3;


        #region FunctionR Consts
        public const int FunctionHalfLength = 20;
        //public const int ArrowHalfWidth = 5;
        //public const int ArrowHalfHeight = 5;
        public const int FunctionCircleRadius = 3;
        public static readonly Color FunctionRColor = Color.Silver;
        public const int FunctionLinePenWidth = 3;
        public const int FunctionCirclePenWidth = 3;
        private const float functionFontHeight = 8;
        private static Pen functionLinePen;
        private static Pen functionCirclePen;
        private static Brush functionBrush;
        public static readonly Font FunctionFont = new Font("Arial", functionFontHeight);
        public const int FunctionSelectThresholdY = 5;
        
        public static Pen FunctionLinePen
        {
            get 
            {
                if (functionLinePen == null)
                {
                    functionLinePen = new Pen(FunctionRColor, FunctionLinePenWidth);
                }
                return functionLinePen;
            }
        }

        public static Pen FunctionCirclePen
        {
            get
            {
                if (functionLinePen == null)
                {
                    functionCirclePen = new Pen(FunctionRColor, FunctionCirclePenWidth);
                }
                return functionCirclePen;
            }
        }

        public static Brush FunctionBrush
        {
            get 
            {
                if (functionBrush == null)
                {
                    functionBrush = new SolidBrush(FunctionRColor);                    
                }
                return functionBrush;
            }
        }

        #endregion

        //private static Image defaultStripeTexture;
        //public static Image DefaultStripeTexture
        //{
        //    get 
        //    {
        //        if (defaultStripeTexture == null)
        //        {
        //            defaultStripeTexture = Image.FromFile("stripes.jpg");
        //        }
        //        return defaultStripeTexture;
        //    }
        //}
    }
}